package com.example.batch;

import org.springframework.batch.item.validator.ValidatingItemProcessor;
import org.springframework.batch.item.validator.ValidationException;

public class CsvItemProcessor extends ValidatingItemProcessor<TestPerson> {

    @Override
    public TestPerson process(TestPerson item) throws ValidationException{
        super.process(item);
        String sex = null;
        if(item.getPersonSex().equals("0")){
            sex = "男";
        }else{
            sex = "女";
        }
        item.setPersonSex(sex);
        return item;
    }

}
